/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package util;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 *
 * @author Steven
 */
public class Utils {
    private static SimpleDateFormat sdf = null;
    public static Date getCurrentDate(){
        return new Date();
    }
    
    public static String getCurrentDate(String format){
        sdf = new SimpleDateFormat(format);
        return sdf.format(new Date());
    }
    
    public static String toShortDateString(String format, Date date){
        sdf = new SimpleDateFormat(format);
        return sdf.format(date);
    }
}
